package com.ming.springcloud.consumer.service;

import com.ming.springcloud.consumer.hystric.StudentServiceHystric;
import com.ming.springcloud.consumer.hystric.UserServiceHystric;
import com.ming.springcloud.consumer.vo.Student;
import com.ming.springcloud.consumer.vo.User;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

@FeignClient(value = "user-service-provider", fallback = UserServiceHystric.class)  //服务提供者的名字
public interface UserService {
    @RequestMapping(value = "/user/login", method = RequestMethod.POST)
    String login(@RequestParam(value = "name") String name, @RequestBody User user);
}
